package com.niit.session


case class CatgegorySortKey(clickCount:Long, orderCount:Long, payCount:Long) extends Ordered[CatgegorySortKey]{
  override def compare(that: CatgegorySortKey): Int = {
    if(this.clickCount - that.clickCount != 0){
      (this.clickCount - that.clickCount).toInt
    }else if(this.orderCount - that.orderCount != 0){
      (this.orderCount - that.orderCount).toInt
    }else{
      (this.payCount - that.payCount).toInt
    }
  }
}
